#include "content/data_provider.hpp"

#include <stdexcept>
#include "content/image.hpp"
#include "content/view_base.hpp"

data_provider::~data_provider() = default;

#define NOT_IMPL throw std::runtime_error("UNIMPLEMENT FUNCTION!!")

#define DATA_TYPE_IMPL_RO(t,n)              \
t data_provider::get_##n() { NOT_IMPL; }    \

#define DATA_TYPE_IMPL_RW(t,n)              \
DATA_TYPE_IMPL_RO(t,n)                      \
void data_provider::set_##n(t v) { NOT_IMPL; }

DATA_TYPE_IMPL_RW(s64, s64)
DATA_TYPE_IMPL_RW(u64, u64)
DATA_TYPE_IMPL_RW(f64, f64)
DATA_TYPE_IMPL_RW(bool, boolean)
DATA_TYPE_IMPL_RW(std::string, std_string)
DATA_TYPE_IMPL_RO(c_string_t, cstring)
DATA_TYPE_IMPL_RO(callback_t, callback)
DATA_TYPE_IMPL_RO(enumerate_t, enumerate)
DATA_TYPE_IMPL_RO(ImageContent*, image)
DATA_TYPE_IMPL_RO(ui_view*, ui)

void data_provider::attach(bindable_base *ctx)
{

}
